package br.inf.solutions.apresentacoes.ssp.view.composer;

import org.springframework.context.annotation.Scope;

import br.com.vexillum.util.ReflectionUtils;
import br.com.vexillum.util.SpringFactory;
import br.inf.solutions.apresentacoes.ssp.control.PreservationController;
import br.inf.solutions.apresentacoes.ssp.model.Preservation;
import br.inf.solutions.apresentacoes.ssp.view.composer.basicforms.BasicFormsComposer;

@SuppressWarnings("serial")
@org.springframework.stereotype.Component
@Scope("prototype")
public class PreservationComposer  extends BasicFormsComposer<Preservation, PreservationController> {

	@Override
	protected String getUpdatePage() {
		return "/paginas/estadoconservacao/modalCadastrar.zul";
	}

	@Override
	public PreservationController getControl() {
		return SpringFactory.getController("preservationController",
				PreservationController.class,
				ReflectionUtils.prepareDataForPersistence(this));
	}

	@Override
	public Preservation getEntityObject() {
		return new Preservation();
	}

}
